using System;

namespace IBNet
{
   /// <summary>
   /// Limit Order
   /// </summary>
   public class LimitOrder : Order
   {
      /// <summary>
      /// Creates a new LimitOrder.
      /// </summary>
      public LimitOrder()
      {
         base.OrderType = OrderType.Limit;
      }

      /// <summary>
      /// Creates a new LimitOrder.
      /// </summary>
      /// <param name="actionSide">The action side, Buy or Sell.</param>
      /// <param name="quantity">The quantity for this order.</param>
      /// <param name="limitPrice">The limit price for this order.</param>
      public LimitOrder(ActionSide actionSide, int quantity, decimal limitPrice)
      {
         base.OrderType = OrderType.Limit;
         base.ActionSide = actionSide;
         base.TotalQuantity = quantity;
         base.LimitPrice = limitPrice;
         base.AllowSubmitOutsideOfRegularTradingHours = true;
      }
   }
}
